﻿#include "FITKSEAJunctionPoint.h"

#include <QList>

namespace Acoustics
{
    FITKSEAJunctionPoint::FITKSEAJunctionPoint()
    {

    }

    FITKSEAJunctionPoint::~FITKSEAJunctionPoint()
    {

    }

    FITKAbstractJunction::JunctionType FITKSEAJunctionPoint::getJunctiontType()
    {
        return FITKAbstractJunction::JunctionType::SEAPointJunction;
    }

    void FITKSEAJunctionPoint::appendConnection(FITKSEAJunPointConStr & connection)
    {
        _connections.append(connection);
    }

    void FITKSEAJunctionPoint::replaceConnections(QList<FITKSEAJunPointConStr>& connections)
    {
        _connections = connections;
    }

    QList<FITKSEAJunPointConStr> FITKSEAJunctionPoint::getConnections()
    {
        return _connections;
    }

    int FITKSEAJunctionPoint::getPointID()
    {
        return _pointID;
    }

    void FITKSEAJunctionPoint::setPointID(int id)
    {
        _pointID = id;
    }

    void FITKSEAJunctionPoint::updateConnect()
    {
        _connections.clear();
        for (int subSysID : _subSysIDList) {
            FITKSEAJunPointConStr str;
            str._subSysID = subSysID;
            _connections.append(str);
        }
        this->FITKSEAAbstractJunction::initUserDefineMatrix(_subSysIDList);
    }
}